I'm looking for a way to count the times a player has died - I want the player to be unable to respawn after they've died three times until the next round starts. Any ideas?
I'm looking for a way to count the times a player has died - I want the player to be unable to respawn after they've died three times until the next round starts. Any ideas?
check mixed gametypes mod , it has all ur needs , but to deaths is some how complex . You can use the event system :3
kill local.attacker local.damage local.inflictor local.position local.direction local.normal local.knockback local.damageflags local.meansofdeath local.location local.player: if(!local.player.deaths) local.player.deaths = 0 local.player.deaths++ if(local.player.deaths >= 3) { //code here (check mefy's mixed gametypes mod ) } end
What gametype are you working with?
If it is a gametype which counts them already(tdm,ffa) etc when they are up on scoretab, you can get them with the command getdeaths
local.player_deaths = local.player getdeaths
Other then that, what ry posted above should be good
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
nah , there is a smarter way , use the script I wrote but instead of creating ur own variables use the get deaths cmd
no need to use loops .
it's more stable that way![]()
Or just use the spawn event
spawn local.player: if((local.player getdeaths) >= 3) { local.player takeall // Takes weapons local.player nodamage /// no damage so they cant die again and mess up others scores } end
Or of course you could freeze/hide/move players out of way/noclip etc
Or just move to spectate but that would cause conflicts when new map, have to move players back/ or move them to a ft type spectate ie floating behind players.
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive